#三元表达式
age =18
if age < 18:
    v = '未成年人'
else:
    v = '未成年人'

v = '未成年人' if  age <18 else '成年人'
#列表生成式
a = [1,2,3,4,5,6]
b = []
for i in a:
    print(i)
    b.append(str(i))
c = [str(i) for i in a] #如果i在a里,生成列表c
d = [str(i) for i in a if i%2 !=0]#如果i在a里,i%2不等于0,生成列表d

print("c:",c)
print("d:",d)